#include "protect.h"
#include <string.h>

ptt_status_bit_t protect = {kNormal};
const static ptt_status_bit_t kCriticalState = PTT_CRITICAL_STATE();

uint32_t PTT_GetStatusBit()
{
    uint32_t status = 0;
    memcpy(&status, &protect, sizeof(protect));
    return status;
}

ptt_status_t PTT_GetStatus()
{
    if ((*(uint32_t *)&protect) & (*(uint32_t *)&kCriticalState))
    {
        return kAbnormal;
    }
    return kNormal;
}

void PTT_ClearStatus()
{
    memset(&protect, kNormal, sizeof(protect));
}

void PTT_Run()
{
}
